-
Notifications
You must be signed in to change notification settings - Fork 649
feat: update mirage tests and route handlers for owner invites #5397
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: update mirage tests and route handlers for owner invites #5397
Conversation
Uses `api/private` over `api/v1/me` for mirage pending owner invites endpoint. And also adds the `expires_at` attribute as part of the payload received as found in the `EncodableCrateOwnerInvitationV1` struct from the API.
return new Response(403, {}, { errors: [{ detail: 'must be logged in to perform that action' }] }); | ||
} | ||
|
||
return schema.crateOwnerInvitations.where({ inviteeId: user.id }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the new endpoint actually works a little bit different. it supports (and iirc requires) query parameters to determine which invites to show.
9fde45f
to
b3034ac
Compare
I just realized that there is already an implementation for that route handler and I just forgot about it... 🤦♂️ sorry for the back and forth. I think with this out of the way the next step would be to switch the existing Ember Data code over to using the new endpoint instead. since this PR was AFAIU only about adding the mirage endpoint I'll go ahead and close it until we have a PR that updates the Ember Data code :) |
Uses
api/private
overapi/v1/me
for mirage pending owner invites endpoint.And also adds the
expires_at
attribute as part of the payload received asfound in the
EncodableCrateOwnerInvitationV1
struct from the API.